package com.xdcplus.web.service.bd;

import com.xdcplus.mp.service.BaseService;
import com.xdcplus.pager.vo.PageVO;
import com.xdcplus.web.common.pojo.dto.bd.BdFactoryDTO;
import com.xdcplus.web.common.pojo.dto.bd.BdFactoryFilterDTO;
import com.xdcplus.web.common.pojo.entity.bd.BdFactory;
import com.xdcplus.web.common.pojo.vo.bd.BdFactoryVO;

import java.util.List;


/**
 * 工厂模型表(BdFactory)表服务接口层
 *
 * @author Fish.Fei
 * @since 2023-01-31 13:35:21
 */
public interface BdFactoryService extends BaseService<BdFactory, BdFactory, BdFactoryVO> {

    /**
     * 添加工厂模型表(BdFactory)
     *
     * @param bdFactoryDTO 工厂模型表(BdFactoryDTO)
     * @return {@link Boolean} 是否成功
     */
    Boolean saveBdFactory(BdFactoryDTO bdFactoryDTO);

    /**
     * 修改工厂模型表(BdFactory)
     *
     * @param bdFactoryDTO 工厂模型表(BdFactoryDTO)
     * @return {@link Boolean} 是否成功
     */
    Boolean updateBdFactory(BdFactoryDTO bdFactoryDTO);

    /**
     * 批量保存或更新工厂模型表(BdFactory)
     *
     * @param bdFactoryList 工厂模型表(BdFactoryList)
     * @return {@link Boolean} 是否成功
     */
    Boolean saveOrUpdateBatch(List<BdFactory> bdFactoryList);

    /**
     * 批量保存或更新工厂模型表(BdFactoryDTOList)
     *
     * @param bdFactoryDTOList 工厂模型表(BdFactoryDTOList)
     * @return {@link Boolean} 是否成功
     */
    Boolean saveOrUpdateBatchByDTOList(List<BdFactoryDTO> bdFactoryDTOList);

    /**
     * 删除工厂模型表(BdFactory)
     *
     * @param id 工厂模型表(BdFactory)主键
     * @return {@link Boolean} 是否成功
     */
    Boolean deleteBdFactoryLogical(Long id);
    
    Boolean deleteBdFactoryByIds(String ids);

    Boolean deleteBdFactoryByIds(List<Long> ids);

    /**
     * 查询工厂模型表(BdFactory)
     *
     * @param bdFactoryFilterDTO 过程状态过滤DTO
     * @return {@link PageVO<BdFactoryVO>} 状态信息
     */
    List<BdFactoryVO> queryBdFactoryVOList(BdFactoryFilterDTO bdFactoryFilterDTO);

    /**
     * 查询工厂模型表(BdFactory)
     *
     * @param bdFactoryFilterDTO 过程状态过滤DTO
     * @return {@link PageVO<BdFactoryVO>} 状态信息
     */
    PageVO<BdFactoryVO> queryBdFactory(BdFactoryFilterDTO bdFactoryFilterDTO);

    /**
     * 查询一个
     *
     * @param id 工厂模型表(BdFactory)主键
     * @return {@link BdFactoryVO} 工厂模型表(BdFactory)信息
     */
    BdFactoryVO queryBdFactoryById(Long id);


    /**
     * 查询bd工厂voby父id
     *
     * @param parentId 父id
     * @return {@link List}<{@link BdFactoryVO}>
     */
    List<BdFactoryVO> queryBdFactoryVOByParentId(Long parentId);

    /**
     * 查询bd工厂votree
     *
     * @param parentId 父id
     * @return {@link List}<{@link BdFactoryVO}>
     */
    List<BdFactoryVO> queryBdFactoryVOTree(Long parentId);

    /**
     * 获取车间产线树型
     * @return
     */
    List<BdFactoryVO>getWorkshopProductionLineTree();

    /**
     * 删除工厂模型表(BdFactory)和下级
     *
     * @param id 工厂模型表(BdFactory)主键
     * @return {@link Boolean} 是否成功
     */
    Boolean deleteBdFactoryWithChildren(Long id);

    /**
     * 获取工厂建模树型
     * @return
     */
    List<BdFactoryVO> queryBdFactoryVOWithOpeTree();

    /**
     * 查询一个
     *
     * @return {@link BdFactoryVO} 工厂模型表(BdFactory)信息
     */
    BdFactoryVO queryBdFactoryByCode(String code);

    List<BdFactory> queryBdFactoryByCodeIn(List<String> codeList);

    /**
     * 根据ids查询bd工厂vo
     *
     * @return {@link List}<{@link BdFactory}>
     */
    List<BdFactory> queryBdFactoryByIds(List<Long> ids);
}
